<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
#Route::get('wx', 'WxController@valid');
Route::post('wx', 'WxController@doDefault');

Route::get('wx/resetmenu', 'WxController@resetClientMenu');

# 微信服务器回调页面
Route::get('page/index', 'PageController@doDefault');
Route::get('page/sport', 'PageController@doSport');
Route::get('page/sleep', 'PageController@doSleep');
Route::get('page/setting', 'PageController@doSetting');
Route::get('page/achievement', 'PageController@doAchievement');
Route::get('page/challenge', 'PageController@doChallenge');

# testing
Route::get('page/test/default', 'TestController@doDefault');

#个人信息
Route::get('page/setting/info', 'PageController@doInfo');

# 设备
Route::get('page/setting/deviceList', 'PageController@doDeviceList');
Route::get('page/setting/deviceDetail', 'PageController@doDeviceDetail');
Route::get('page/setting/deviceQrcode', 'PageController@doDeviceQrcode');
Route::get('page/setting/deviceIntroduce', 'PageController@doDeviceIntroduce');

Route::get('page/setting/lighttenBracelet', 'PageController@doLighttenBracelet');

# 首页显示控制
Route::get('page/setting/switch', 'PageController@doSwitchPage');
# 帮助
Route::get('page/setting/help', 'PageController@doHelp');
# 手环控制
Route::get('page/setting/contorlBracelet', 'PageController@doContorlBracelet');

# 页面加载数据接口
Route::post('api/ajax/getDefaultData', 'AjaxWxJsApiController@doGetDefaultData');

Route::post('api/ajax/getSleepData', 'AjaxWxJsApiController@doGetSleepData');
Route::post('api/ajax/getSleepDataOfPage', 'AjaxWxJsApiController@doGetSleepDataOfPage');

Route::post('api/ajax/getSportData', 'AjaxWxJsApiController@doGetSportData');
Route::post('api/ajax/getSportDataOfPage', 'AjaxWxJsApiController@doGetSportDataOfPage');

Route::post('api/ajax/getWeixinSignatureData', 'AjaxWxJsApiController@doGetWeixinSignatureData');
Route::post('api/ajax/getDeviceInfo', 'AjaxWxJsApiController@doGetDeviceInfo');

Route::post('api/ajax/editMemberData', 'AjaxWxJsApiController@doEditMemberData');

Route::post('api/ajax/getAchievementData', 'AjaxWxJsApiController@doGetAchievementData');

Route::post('api/ajax/getDeviceList', 'AjaxWxJsApiController@doGetDeviceListData');
Route::post('api/ajax/getDeviceDetail', 'AjaxWxJsApiController@doGetDeviceDetailData');

Route::post('api/ajax/getSwitch', 'AjaxWxJsApiController@doGetSwitchData');

Route::post('api/ajax/getDekaron', 'AjaxWxJsApiController@doGetDekaronData');
